/* All these delay_xxx() functions make use of the # of cycles    */
/* it requires to delay for xxx amount of time with a 20MHz clock */
#include <p18cxxx.h>
#include <delays.h>
#include "timedelays.h"

void delay_1us(void)
{
	Nop();
	Nop();
	Nop();
	Nop();
	Nop();
}

	
void delay_10us(void)
{
	Delay10TCYx(5);
}

	
void delay_100us(void)
{
	Delay100TCYx(5);
}	


void delay_1ms(void)
{
	Delay1KTCYx(5);
}

	
void delay_10ms(void)
{
	Delay10KTCYx(5);
}

	
void delay_100ms(void)
{
	Delay10KTCYx(50);
}

	
void delay_500ms(void)
{
	delay_100ms();
	delay_100ms();
	delay_100ms();
	delay_100ms();
	delay_100ms();
}

	
void delay_1s(void)
{
	delay_500ms();
	delay_500ms();
}
